﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Serialization;
using Users;
using Lists;
using Sim;

namespace Users
{
    //public enum userLevel { Diver = 0, Judge = 1, Admin = 2 }
    //public enum Sex { F = 0, M = 1 }
    [Serializable()]
    public class User //Inherits from main
    {
        /// <summary>
        /// Properties
        /// </summary>
        [XmlElement("ID")]
        public int id { get; set; }
        [XmlElement("First_Name")]
        public string firstName { get; set; }
        [XmlElement("Last_Name")]
        public string lastName { get; set; }
        [XmlElement("Age")]
        public int age { get; set; }
        [XmlElement("Nation")]
        public string nation { get; set; }
        [XmlElement("Sex")]
        public string sex { get; set; }
        [XmlElement("Level")]
        public int level { get; set; }

        [XmlElement("Username")]
        public string username { get; set; }
        [XmlElement("Password")]
        public string password { get; set; }

        /// <summary>
        /// Constructor w/ parameters
        /// </summary>
        /// <param name="name"></param>
        /// <param name="nation"></param>
        /// <param name="sex"></param>
        /// <param name="type"></param>
        /// <param name="username"></param>
        /// <param name="password"></param>
        public User(string firstName, string lastName, int age, string nation, string sex, int level, string username, string password)
        {
            this.firstName = firstName;
            this.lastName = lastName;
            this.age = age;
            this.nation = nation;
            this.sex = sex;
            this.level = level;
            this.username = username;
            this.password = password;
        }

        /// <summary>
        /// Constructor w/o parameters
        /// </summary>
        public User()
        {
            firstName = "";
            lastName = "";
            age = 0;
            nation = "";
            sex = "";
            level = 0;
            username = "";
            password = "";
        }

    }
}
